from distance import *
lat=[]
lon=[]
for line in open("track","r"):
    line=line.split(";")
    lat.append(line[0])
    lon.append(line[1])
j=1
for i in range(len(lat)):
    for j in range(i+1,len(lat)):
        a=(lat[i],lon[i])
        b=(lat[j],lon[j])
        if (disp(a,b)<0.01):
           lat.remove(lat[j])
           lon.remove(lon[j])
        else:
           break
f=open("track1","w")

for i in range(len(lat)):
    line=str(lat[i])+';'+str(lon[i])
    f.write(line)
    #f.write("\n")
f.close()
       
        
       
